#ifndef   H_A2NIKA
#define   H_A2NIKA


#ifndef __WATCOMC__
#if ! (defined(lint) || defined(_lint))
#  if ( _MSC_VER > 800 )
#    pragma warning(disable:4103)
#    if !(defined( MIDL_PASS )) || defined( __midl )
#      pragma pack(push)
#    endif
#    pragma pack(8)
#  elif defined(__BORLANDC__)
#    pragma option -a-
#  else
#    pragma pack(1)
#  endif
#endif // ! (defined(lint) || defined(_lint))
#endif

#ifndef H_A2SYSDEF
# include "a2sysdef.h"
#endif

#ifndef H_A2DIO
# include "a2dio.h"
#endif


#ifndef H_A2TRDEF
# include "a2trdef.h"
#endif

#ifndef H_A2TR
# include "a2tr.h"
#endif

#ifndef H_A2DDT
# include "a2ddt.h"
#endif

#ifndef H_A2ACC
# include "a2acc.h"
#endif

//#ifndef H_A2CONV
//# include "a2conv.h"
//#endif

#ifndef H_A2NET
# include "a2net.h"
#endif

#ifndef H_A2CRYPT
# include "a2crypt.h"
#endif

typedef TREE   A2FAR *LPTREE;
typedef ACCESS A2FAR *LPACCESS;
typedef void   A2FAR *LP_VOID;
typedef char   A2FAR *LP_CHAR;
typedef int    A2FAR *LP_INT;

#ifdef __cplusplus
 extern "C" {
#endif

/*----------*/
/* a2tree.c */
/*----------*/
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#ifdef __DPMI16__
extern int far pascal _export TreeCP  (LPTREE pt);
extern LPTREE far pascal _export TreeOpen (LP_INT perr, LP_CHAR fname, int disp);
extern int far pascal _export TreeClose (LPTREE pt);
extern int far pascal _export TreeSJ (LPTREE pt, int on);
#else
A2EXT int A2PAS TreeCP  (LPTREE pt);
A2EXT LPTREE A2PAS TreeOpen (LP_INT perr, LP_CHAR fname, int disp);
A2EXT int  A2PAS TreeClose (LPTREE pt);
A2EXT int  A2PAS TreeSJ (LPTREE pt, int on);
#endif
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

A2EXT int A2PAS TreeSKD(
   LPTREE pt, char m,char o, char tk,LP_VOID pk, char td,LP_VOID pd
);
A2EXT int A2PAS TreeSK (LPTREE pt, char mv,char op, char tk, LP_VOID pk);
A2EXT int A2PAS TreeSD (LPTREE pt, char mv,char op, char td, LP_VOID pd);
A2EXT int A2PAS TreeS  (LPTREE pt, char mv, char op);

A2EXT int A2PAS TreeSLVL (LPTREE pt, int lvl);
A2EXT int A2PAS TreeSGLVL(LPTREE pt, int lvl);

A2EXT int A2PAS TreeCPY (char op, LPTREE pt1, LPTREE A2FAR *ppt2);
A2EXT int A2PAS TreeDUP (LPTREE pt1, LPTREE A2FAR *ppt2);
A2EXT int A2PAS TreeDLT (LPTREE pt1, LPTREE A2FAR *ppt2);
A2EXT int A2PAS TreeSAV (LPTREE pt);
A2EXT int A2PAS TreeRST (LPTREE pt);

/*------------*/
/* a2access.c */
/*------------*/
A2EXT LPACCESS A2PAS AcsOpen(LP_INT perr,LP_CHAR fdod,LP_CHAR ftre,int disp);
A2EXT int A2PAS AcsClose (LPACCESS pacc);
A2EXT int  A2PAS AcsSJ (LPACCESS pacc, int on);

A2EXT int A2PAS AcsSKD(
   LPACCESS pacc,char m,char o, char tk,LP_VOID k, char td,LP_VOID d
);
A2EXT int A2PAS AcsSK (LPACCESS pacc, char mv, char op, char tk, LP_VOID key);
A2EXT int A2PAS AcsSD (LPACCESS pacc, char mv, char op, char td, LP_VOID data);
A2EXT int A2PAS AcsS (LPACCESS pacc, char mv, char op);

A2EXT int A2PAS AcsSLVL (LPACCESS pacc, int lvl);
A2EXT int A2PAS AcsSGLVL(LPACCESS pacc, int lvl);

A2EXT int A2PAS AcsCPY (char op, LPACCESS pacc1, LPACCESS A2FAR *ppacc2);
A2EXT int A2PAS AcsDUP (LPACCESS pacc1, LPACCESS A2FAR *ppacc2);
A2EXT int A2PAS AcsDLT (LPACCESS pacc1, LPACCESS A2FAR *ppacc2);
A2EXT int A2PAS AcsSAV (LPACCESS pacc);
A2EXT int A2PAS AcsRST (LPACCESS pacc);
A2EXT int A2PAS AcsCP  (LPACCESS pacc);

A2EXT int A2PAS AcsCopy(LPACCESS paccSrc, LPACCESS paccDst, int IgnErr);

/*-----------*/
/* a2trcas.c */
/*-----------*/
EXTERNFUNC int EXPORTFUNC a2TreeCros (
   int Flag, LPTREE tr1, LPTREE tr2, LPTREE tr3, unsigned long A2FAR *vSc
);
EXTERNFUNC int EXPORTFUNC a2TreeSub (
   int Flag, LPTREE tr1, LPTREE tr2, LPTREE tr3, unsigned long A2FAR *vSc
);
EXTERNFUNC int EXPORTFUNC a2TreeAdd (
   int Flag, LPTREE tr1, LPTREE tr2, LPTREE tr3, unsigned long A2FAR *vSc
);

#define TreeCros a2TreeCros
#define TreeSub  a2TreeSub
#define TreeAdd  a2TreeAdd

#if defined(__FOR_WINDOWS__) || defined(__FOR_WIN32__)
 A2EXT void A2PAS a2Trace (LPSTR pstr);
#endif

#ifdef __cplusplus
 }
#endif


#ifndef __WATCOMC__
#if ! (defined(lint) || defined(_lint))
#  if ( _MSC_VER > 800 )
#    pragma warning(disable:4103)
#    if !(defined( MIDL_PASS )) || defined( __midl )
#      pragma pack(pop)
#    else
#      pragma pack()
#    endif
#  elif defined(__BORLANDC__)
#    pragma option -a.
#  else
#    pragma pack()
#  endif
#endif // ! (defined(lint) || defined(_lint))
#endif


#endif /* H_A2NIKA */
